<template>

  <div class="main-app">

    <div class="header">
      <div class="btn-row">
        <div class="btn-item">
          <img class="btn-img" src="./assets_page1/1.1 account searching_icon.svg" />
          <!-- <router-link to="/load" class="btn-text">账户查询</router-link> -->
           <span class="btn-text">账户查询</span>
        </div>
        <div class="btn-item">
          <img class="btn-img" src="./assets_page1/1.2 card management_icon.svg" />
          <router-link to="/load" class="btn-text">扫一扫</router-link>
        </div>
        <router-link to="/anniu">
        <div class="btn-item">
          <img class="btn-img" src="./assets_page1/1.3 scaning_icon.svg" />
          <!-- <router-link to="/anniu" class="btn-text">通知设置</router-link> -->
           <span class="btn-text">通知设置</span>
        </div>
      </router-link>
        <div class="btn-item">
          <img class="btn-img" src="./assets_page1/1.4 notification setting_icon.svg" />
          <router-link to="/load" class="btn-text">卡片管理</router-link>
        </div>
      </div>
    </div>
    <var-space direction="column">
      <var-input size="small" variant="outlined" placeholder="黄金股震荡走低，山东黄金跌超4%..." v-model="value7">
        <template #prepend-icon>
          <var-icon class="prepend-icon" name="magnify" />
        </template>
        <template #append-icon>
          <var-icon class="append-icon" name="message-text-outline" />
        </template>
      </var-input>
    </var-space>
    <div class="container">
      <div class="btn-box">
        <div class="btn-row">
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.1 detail searching_icon.svg" />
            <span>明细查询</span>
          </div>
          <router-link to="/caifu">
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.2 wealth management.svg" />
            <!-- <router-link to="/caifu"><span>财富管理</span></router-link> -->
             <span>财富管理</span>
          </div>
        </router-link>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.3 huge deposit.svg" />
            <span>大额存单</span>
          </div>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.4 foreign exchange.svg" />
            <span>结汇购汇</span>
          </div>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.5 bail.svg" />
            <span>保证金</span>
          </div>
        </div>
        <div class="btn-rowtwo">
          <router-link to="/map">
            <div class="btn-item">
              <img class="btn-img" src="./assets_page1/3.6 address searching.svg" />
              <span>网点查询</span>
            </div>
          </router-link>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.7 supplychain.svg" />
            <span>供应金融</span>
          </div>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.8 happy deposit.svg" />
            <span>安心存款</span>
          </div>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.9 salary manager.svg" />
            <span>薪酬管家</span>
          </div>
          <div class="btn-item">
            <img class="btn-img" src="./assets_page1/3.10 more.svg" />
            <span>更多.</span>
          </div>
        </div>
      </div>
      <div class="notice-bar">
        <van-notice-bar left-icon="volume-o" color="#000000" background="#FFFFFF"
          text="开通个人养老金正当时间,现在有机会领到最高690元红包..." />
      </div>
      <div class="sashow-box">
        <text class="sashow-text">
          特色专区
        </text>
        <div class="sashow-img">
          <img class="sashow-img__item" src="./assets_page1/supplychain.svg" />
          <img class="sashow-img__itemone" src="./assets_page1/5.2 park.svg" />
          <img class="sashow-img__itemtwo" src="./assets_page1/5.3 tech.svg" />
        </div>
      </div>
      <div class="laypo-box">
        <text class="sashow-text">
          财富优选
        </text>
        <div class="sashow-img-slider">
          <img class="sashow-img__item-slider" src="./assets_page1/6.1 pension.svg" />
          <img class="sashow-img__item-slider" src="./assets_page1/6.2 financing.svg" />
          <img class="sashow-img__item-slider" src="./assets_page1/6.3 dreaming.svg" />
          <img class="sashow-img__item-slider" src="./assets_page1/6.1 pension.svg" />
          <img class="sashow-img__item-slider" src="./assets_page1/6.2 financing.svg" />
          <img class="sashow-img__item-slider" src="./assets_page1/6.3 dreaming.svg" />
        </div>
      </div>
      <div class="doller-box">
        <text class="sashow-text">
          财富顾问
        </text>
        <!-- 使用 <router-link> 标签使其可点击 -->
        <!-- <router-link to="/pick" class="doller-img"> -->
          <img class="doller-img__item" src="./assets_page1/7 wealth consultant.svg" @click="dialogTableVisible = true"/>
        <!-- </router-link> -->
        <!-- <div class="location" @click="dialogTableVisible = true">
            <img src="./assets/理财顾问模块.svg" alt="加载出错，请找lzb调试">
        </div> -->

        <el-dialog v-model="dialogTableVisible" width="200">
            <img class="dialog-img" src="./assets_page1/弹窗.png" alt="加载出错，请找lzb调试" @click="dialogTableVisible = false">
        </el-dialog>
        <!-- </div>

  </div>             -->
      </div>
      <div class="bank-box">
        <text class="sashow-text">
          网点查询
        </text>
        <div class="bank-img" @click="$router.push('/map')">
          <text class="bank-text">啵啵区啵啵大街网点</text>
          <div class="bank-chips">
            <var-chip color="#FFFFFF" text-color="#0077ff" size="mini" type="info">饮用水</var-chip>
            <var-chip color="#FFFFFF" text-color="#0077ff" size="mini" type="info">手机充电</var-chip>
            <var-chip color="#FFFFFF" text-color="#0077ff" size="mini" type="info">停车场</var-chip>
            <var-chip color="#FFFFFF" text-color="#0077ff" size="mini" type="info">WIFI</var-chip>
          </div>
          <div class="momo">
            <var-icon name="map-marker-radius" :size="11"></var-icon>
            <text class="bank-textarea">啵啵大街南石葵路路口</text>
          </div>
          <div class="momo">
            <img class="doller-img__item" src="./assets_page1/8.3 navigation icon.svg" />
            <img class="doller-img__item" src="./assets_page1/8.4 telephone icon.svg" />
          </div>
          <div class="momo">
            <var-icon name="menu-down" :size="11"></var-icon>
            <text class="bank-textarea">查看更多</text>
          </div>
        </div>
      </div>

    </div>
  </div>

</template>


<script setup>
import { ref } from 'vue'
import { RouterLink } from 'vue-router';
const dialogTableVisible = ref(false)
const value7 = ref('')
const handleClick = () => {
  // 在这里添加点击事件的处理逻辑
  console.log('财富顾问卡片被点击了')
}
</script>

<style>
.header {
  margin: 0 0 5% 0;
  padding-top: 10%;
  padding-bottom: 10%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.header .btn-text {
  color: black;
  font-size: 12px;
  font-weight: bold;
}

.main-app {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 15px;
  padding-bottom: 0;
  background-color: #ededed;
  background-image: url('./assets_page1/1 background 1.svg');
  background-position: 0 -180px;

}

.laypo-box {
  display: flex;
  flex-direction: column;
  margin-top: 2%;
}

.doller-box {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  margin-top: 4%;
}

.momo {
  margin-top: 2%;
}

.pulling-container {
  position: relative;
}

.less {
  position: absolute;
  top: 80%;
  left: 20%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 11px;
  z-index: 1;
}

.lessone {
  position: absolute;
  top: 80%;
  left: 40%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 11px;
  z-index: 1;
}

.lesstwo {
  position: absolute;
  top: 80%;
  left: 60%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 11px;
  z-index: 1;
}

.lessthree {
  position: absolute;
  top: 80%;
  left: 80%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 11px;
  z-index: 1;
}

.less-text {
  margin-left: 15%;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.append-icon {
  width: 50%;
  height: 50%;
}

.bank-box {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  margin-top: 2%;
  margin-bottom: 25%;
}

.bank-text {
  margin-bottom: 10px;
}

.bank-chips {
  display: flex;
  gap: 5px;
}

.bank-textarea {
  font-size: 11px;
}

.bank-img {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 30px;
  align-items: center;
  margin: 10px 0 0 0;
  background-image: url('./assets_page1/8 background.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px;
}


.doller-img {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 0 0;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);

}

.doller-img__item,
.bank-img__item {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dialog-img {
    width: 100%;
    height: 50%;

}
.sashow-box {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  margin-top: 5%;
  background: linear-gradient(to bottom, #eddede, white);
  height: 180px;
  box-shadow: 6px 6px 8px 8px rgba(0, 0, 0, 0.1);
}

.sashow-text {
  display: flex;
  justify-content: left;
  margin: 4% 0 0 5%;
  font-size: 18px;
  font-weight: bold;
}

.sashow-img {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 10px 0 5px;
}

.sashow-img__item {
  max-width: 35%;
  height: auto;
}

.sashow-img__itemone {
  max-width: 35%;
  height: auto;
}

.sashow-img__itemtwo {
  max-width: 32%;
  height: auto;
}

.sashow-img-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  white-space: nowrap;
  margin: 10px 0px 0 0px;

  &::-webkit-scrollbar {
    display: none;
  }
}


.sashow-img__item-slider {
  flex-shrink: 0;
  width: calc(100% / 3);
  height: auto;
  scroll-snap-align: start;
  margin-right: 10px;
}

.notice-bar {
  margin-top: 5%;
  box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.1);

}

.btn-link {
  font-size: 13px;
  /* 确保字体大小一致 */
  text-decoration: none;
  /* 去掉默认的下划线 */
  color: inherit;
  /* 继承父元素的颜色 */
}

.container {
  background-image: url('./assets_page1/1 background shade.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-left: -15px;
  margin-right: -15px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  /* 白色背景，0.5 是透明度 */
  border-radius: 20px 20px 0 0;
  /* 设置圆角 */
}

.btn-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px 20px 0 0;
  background-color: #ffffff;
  height: 200px;
  box-shadow: 6px 6px 8px 8px rgba(0, 0, 0, 0.1);
}

.btn-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: -2%;
  margin-left: 0.5%;
  margin-right: 1%;
  flex-grow: 1;
}

.btn-rowtwo {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: -10%;
  margin-right: 1%;
  margin-left: 0.5%;
  flex-grow: 1;
}

.btn-img {
  width: 40px;
  /* 设定统一的宽度 */
  height: 40px;
  /* 设定统一的高度 */
}


.btn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  /* 控制图标和文字的间距 */
}

.btn-item span {
  font-size: 14px;
  /* 设定相同的字体大小 */
  line-height: 1.5;
  /* 可根据需要调整行高 */
}


.prepend-icon {
  margin-right: 6px;
}

.append-icon {
  margin-left: 6px;
}
</style>